<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:ctg="http://www.crotouristguide.com/taglib"
	xmlns:c="http://java.sun.com/jstl/core">
<body>
<ui:component>

	<script type="text/javascript">
		jQuery(document).ready(function($) {
		 	 jQuery('#gallery a').lightBox({
				imageLoading: '#{application.contextPath}/theme/default/css/lightbox/images/lightbox-ico-loading.gif',
				imageBtnClose: '#{application.contextPath}/theme/default/css/lightbox/images/lightbox-btn-close.gif',
				imageBtnPrev: '#{application.contextPath}/theme/default/css/lightbox/images/lightbox-btn-prev.gif',
				imageBtnNext: '#{application.contextPath}/theme/default/css/lightbox/images/lightbox-btn-next.gif',
				imageBlank: '#{application.contextPath}/theme/default/css/lightbox/images/lightbox-blank.gif'
		 	 });
		});
	</script>

	<div id="gallery">
	<ul>	
		<c:forEach items="#{wikiService.getPageImages(messages[stringUtil.merge('wiki.',type,'.',page)] != stringUtil.merge('wiki.',type,'.',page) ? messages[stringUtil.merge('wiki.',type,'.',page)] : page)}" var="image" varStatus="status">			
			<li>
				<h:outputLink value="#{application.contextPath}/seam/resource/image" title="">
					<f:param name="wikiImage" value="#{image}"></f:param>
					<h:graphicImage value="/seam/resource/image?width=250&amp;height=190&amp;wikiImage=#{image}" alt="#{messages['label.image.alt']} #{page}" rendered="#{status.index == 0}"/>					
				</h:outputLink>		
			</li>			
		</c:forEach>
		<h:graphicImage value="/resources/images/no_image.png" rendered="#{wikiService.getPageImages(messages[stringUtil.merge('wiki.',type,'.',page)] != stringUtil.merge('wiki.',type,'.',page) ? messages[stringUtil.merge('wiki.',type,'.',page)] : page).size() == 0}" alt="#{messages['label.image.alt']}"></h:graphicImage>
	</ul>
	</div>
</ui:component>
</body>
</html>
